#include <stdio.h>

/* Small function that takes input and replacing all 
strings of more than one blank by a single blank. */

main()
{
	int c, nb;	
	
	nb = 0;
	while ((c = getchar()) != EOF) {
		if (c == ' ')					/* nb counts the number of blanks */
			++nb;
		else							/* reset nb if we hit a letter */
			nb = 0;
		if (nb < 2)						/* do output if we're at nb = 1 or nb = 0  */
			putchar(c);
	}			
}